import { Layout } from 'antd'
import Sidebar from './components/Sidebar'
import AttachPages from './pages/attach'
import 'antd/dist/reset.css'
import { useState } from 'react'


const { Content } = Layout;

function App() {
  const [activeMenu, setActiveMenu] = useState('attachment')
  const handleMenuClick = (menuKey) => {
    setActiveMenu(menuKey)
  }
  const renderContent = () => {
    switch (activeMenu) {
      case 'attachment':
        return <AttachPages />
      default:
        return <div>其他功能开发中...</div>
    }
  }
  return (
    <Layout style={{ minHeight: '100vh' }}>
      <Sidebar onMenuClick={handleMenuClick} />
      <Content style={{ marginLeft: '48px', padding: '24px' }}>{renderContent()}</Content>
    </Layout>
  )
}

export default App
